<!DOCTYPE html>
<html>
<head>
    <title>寄卡信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <#include "../../../../include/resources.html" />

        <script type="text/javascript">

            $(function() {
                dataGrid = $('#dataGrid').datagrid({
                    url : 'cardSendList.html',
                    fit : true,
                    fitColumns : true,
                    border : false,
                    pagination : true,
                    idField : 'id',
                    pageSize : pageSize,
                    pageNums :1,
                    pageList : pageList,
                    sortName : 'id',
                    sortOrder : 'asc',
                    checkOnSelect : false,
                    selectOnCheck : false,
                    nowrap : false,
                    singleSelect:true,
                    columns : [ [
                        { field: 'id', title: '编号', width: 50, checkbox : false},
                        { field: 'sendName', title: '寄卡人姓名', width: 100, sortable: false},
                        { field: 'sendPhone', title: '寄卡人电话', width: 100, checkbox : false},
                        { field: 'sendEmail', title: '寄卡人邮箱', width: 100, checkbox : false},
                        { field: 'sendAddress', title: '寄卡人地址', width: 100, sortable: false},
                        { field: 'receiveName', title: '收卡人姓名', width: 100, sortable: false},
                        { field: 'receivePhone', title: '收卡人电话', width: 100, checkbox : false},
                        { field: 'receiveEmail', title: '收卡人邮箱', width: 100, checkbox : false},
                        { field: 'receiveAddress', title: '收卡人地址', width: 100, sortable: false},
                        { field: 'remark', title: '备注', width: 100, sortable: false},
                        { field: 'addTime', title: '添加时间', width: 150, sortable:false,
                            formatter: function(value,row,index){
                                return getLocalTime(value,4);
                            }
                        },

                    ] ],
                    toolbar : '#toolbar',
                    onLoadSuccess : function() {
                        $('#searchForm table').show();
                        parent.$.messager.progress('close');
                    }
                });
            });

            function exportExcel(){
                var url = "/modules/additional/cardSend/exportExcelList.html";
                var sendName = $("#sendName").val();
                var sendPhone = $("#sendPhone").val();
                var receiveName = $("#receiveName").val();
                var receivePhone = $("#receivePhone").val();
                var receiveStartTime = $("#receiveStartTime").val();
                var receiveEndTime = $("#receiveEndTime").val();
                var sou = "?sendName=" + sendName + "&sendPhone=" + sendPhone + "&receiveName=" + receiveName + "&receivePhone=" + receivePhone + "&receiveStartTime=" + receiveStartTime + "&receiveEndTime=" + receiveEndTime;
                window.location.href = url+sou;
            }
        </script>
</head>
<body style="padding:0 20px;" >
<div class="easyui-layout" data-options="fit : true,border : false">
    <div data-options="region:'north',border:false,collapsible:false" id="searchBox">
        <div class="sLeft">
            <form id="searchForm">
                <input type="text"  name="searchName" class="sInput" placeholder="输入寄/收卡人姓名或手机查询" autocomplete="off" onkeydown="if(event.keyCode == 13){ $.fn.dataGridOptions.searchFun('#searchForm');return false;}"/><a href="javascript:;" title="查询" class="sBtn" onclick="$.fn.dataGridOptions.searchFun('#searchForm');">查询</a><a href="javascript:;" class="advBtn" title="条件查询">条件查询 <i class="iconfont">&#xe638;</i></a>
                <a href="javascript:void(0);" class="reloadIcon" onclick="dataGrid.datagrid('reload');" title="刷新" ><i class="iconfont">&#xe603;</i></a>
            </form>
        </div>
        <form id="showAdw">
            <ul class="showAdw" style="display:none;">
                <a href="javascript:void(0);"><i class="iconfont closeWin">&#xe63a;</i></a>
                <li><span>寄卡人姓名</span><input type="text" name="sendName" id="sendName" autocomplete="off"/></li>
                <li><span>寄卡人手机号</span><input type="text" name="sendPhone" id="sendPhone" autocomplete="off"/></li>
                <li><span>收卡人姓名</span><input type="text" name="receiveName" id="receiveName" autocomplete="off"/></li>
                <li><span>收卡人手机号</span><input type="text" name="receivePhone" id="receivePhone" autocomplete="off"/></li>
                <li><span>添加时间</span><input type="text" name="receiveStartTime" id="receiveStartTime" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'receiveEndTime\')}',readOnly:true})" class="searchTime"/>&nbsp;-&nbsp;<input type="text" name="receiveEndTime" id="receiveEndTime" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'receiveStartTime\')}',readOnly:true})" class="searchTime"/></li>
                <li><span>&nbsp;</span><a href="javascript:void(0);" class="searchBtn sureBtn" onclick="$.fn.dataGridOptions.searchFun('#showAdw');">确定</a><a href="javascript:void(0);" class="searchBtn" onclick="$.fn.dataGridOptions.cleanFun('#searchForm');">重置</a></li>
            </ul>
        </form>
        <div class="sRight">
            <a id="a" onclick="exportExcel();" href="javascript:void(0);" class="addBtn">导出excel</a>
        </div>
    </div>
    <div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
        <table id="dataGrid"></table>
    </div>
</div>
</body>
</html>
<script src="${theme_dir}/js/search.js"></script>